package com.climb.moive.service.impl;

import com.climb.moive.dao.AdminDao;
import com.climb.moive.dao.impl.AdminDaoImpl;
import com.climb.moive.entity.Admin;
import com.climb.moive.exception.ApplicationException;
import com.climb.moive.service.AdminService;

import java.sql.SQLException;

/**
 * @author Administrator
 */
public class AdminServiceImpl implements AdminService {
    AdminDao adminDao=new AdminDaoImpl();
    @Override
    public Admin login(Admin admin) {
        try {
            return adminDao.login(admin);
        } catch (SQLException ex) {
            throw new ApplicationException("登录失败", ex);
        }
    }
}
